package com.situ.mall.order.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.situ.mall.order.pojo.query.OrderInfoQuery;
import com.situ.mall.order.pojo.vo.OrderCountVO;
import com.situ.mall.order.pojo.vo.OrderInfoVO;
import com.situ.mall.pojo.entity.order.OrderInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 订单 Mapper 接口
 * </p>
 *
 * @author Sun Huijuan
 * @since 2024-10-14
 */
public interface OrderInfoMapper extends BaseMapper<OrderInfo> {
	
	List<OrderInfoVO> list(OrderInfoQuery orderInfoQuery);
	
	@MapKey("oi.id")
	IPage<Map<String,Object>> selectListPortal(Page<Map<String, Object>> page,@Param(Constants.WRAPPER) QueryWrapper<Map<String,Object>> wrapper);
	
	List<OrderCountVO> selectOrderCount();
	
	BigDecimal selectSaleCount();
	
	List<OrderInfoVO> selectAll();
}
